
import { createApp } from 'vue'
import App from './App.vue'
// import './rem.js'
import './resetui.less'
import router from './router.js'

import axios from 'axios'
import VueAxios from 'vue-axios'
import global_ from './global/global'//引用文件
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import * as echarts from 'echarts'

const app = createApp(App)
    .use(router)
    .use(VueAxios, axios)
    .use(ElementPlus, {
        locale: zhCn,
    })

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

// axios.interceptors.request.use(config => {
//     config.headers.Authorization = localStorage.getItem('token')
//     return config                                                                                                       
// })

app.config.globalProperties.GLOBAL = global_
app.mount('#app')